//
//  WYCommentHeaderCell.m
//  Boss
//
//  Created by admin on 2018/8/6.
//  Copyright © 2018年 admin. All rights reserved.
//

#import "WYCommentHeaderCell.h"
@interface WYCommentHeaderCell()
@property (strong, nonatomic) IBOutlet UIImageView *userImageView;
@property (strong, nonatomic) IBOutlet UILabel *nameLabel;
@property (strong, nonatomic) IBOutlet UILabel *timeLabel;
@property (strong, nonatomic) IBOutlet UILabel *contentLabel;
@property (strong, nonatomic) IBOutlet UIButton *button;
@property (strong, nonatomic) IBOutlet UIImageView *vipImageView;


@end
@implementation WYCommentHeaderCell

- (void)awakeFromNib {
    [super awakeFromNib];
    [self.userImageView setCornerRadius:20.f];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
-(void)setList:(WYCommentList *)list
{
    _list = list;
    
    [self.userImageView sd_setImageWithURL:[NSURL URLWithString:list.userPhoto] placeholderImage:[UIImage imageNamed:@"ic_defult_avatar"]];
    self.nameLabel.text = list.userName;
    self.timeLabel.text = [NSString compareCurrentTime:list.createTime];
    self.contentLabel.text = list.content;
    [self.vipImageView showVipImageViewStatusWithVipId:list.userVipLevel];
}
- (IBAction)buttonAction:(id)sender {
    if ([self.delegate respondsToSelector:@selector(didSelectButton)]) {
        [self.delegate didSelectButton];
    }
    
    
}
@end
